import userCarState from './state';
import mutations from './mutations';

export default {
  state: {
    userCarState
  },
  mutations,
  getters: {
    getUserInfo(state) {
      return state.userInfo;
    },
    handleStartAddress: state => state.userCarState.callCarParams.startAddress,
    handleEndAddress: state => state.userCarState.callCarParams.endAddress,
    handleIsOpenCityName: state => state.userCarState.searchAddress.isOpenCityName,
    handleSearchCityNameText: state => state.userCarState.searchAddress.searchCityNameText,
    handleSearchAddressText: state => state.userCarState.searchAddress.searchAddressText,
    handleGeolocaltionState: state => state.userCarState.geolocaltion,
    handleUserCarTitle: state => state.userCarState.userCarTitle,
  },
  actions: {
    setUserInfo({commit}, user) {
      commit('setUserInfo', user);
    }
  }
};
